﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sealight.Core.Domain
{
   public class ProductRatingEntity:BaseEntity
    {
       public virtual Guid ProductRatingID { get; set; }
       public virtual ProductEntity Product { get; set; }
       public virtual UserEntity User { get; set; }
       public virtual int Rating { get; set; }
       public virtual DateTime RatedOn { get; set; }
       public virtual Sealight.Core.DataAdapter.product_rating ToDataAdapter()
       {
           return new DataAdapter.product_rating
           {
               id = this.ProductRatingID,
               rating = this.Rating,
               rating_on = this.RatedOn,
               product = this.Product.ToDataAdapter(),
           user=this.User.ToDataAdapter()};
       }
    }
}
